<?php defined('IN_PHPCMS') or exit('Access Denied'); ?><?php include template('yp', 'header'); ?>
<div id="main">
  <div id="right">
    <div id="position"><strong>当前位置：</strong><a href="<?php echo $M['url'];?>">企业黄页</a><a href="<?php echo $M['url'];?>product.php">产品</a>产品信息</div>
    <div class="mar_10">
      <div class="f_r" style="width:360px;">
  
        <h1 id="p_name"><?php echo $rs['title'];?></h1>
        <ul class="d_list" style="clear:both">
          <li>　单　价：<?php if($rs['price']) { ?>￥<?php echo $rs['price'];?>元/<?php echo $rs['quantifier'];?><?php } else { ?><a href="<?php echo company_url($c['userid'],$c[sitedomain]);?>/category-guestbook/label-product/id-<?php echo $rs['id'];?>.html">我要询价</a><?php } ?></li>
  <?php if($rs[standard]) { ?><li>产品型号：<?php echo $rs['standard'];?></li><?php } ?>
          <li>　浏览量：<?php echo $rs['hits'];?>次</li>
          <li>　联系人：<?php echo $c['linkman'];?></li>
          <li>发布时间：<?php echo date("Y-m-d H:i:s",$rs['inputtime']);?></li>
          <li>更新时间：<?php echo date("Y-m-d H:i:s",$rs['updatetime']);?></li>
        </ul>
        <div class="btn_box">
  <script type="text/javascript" id="callback_js"></script>
  <script language="JavaScript" src="<?php echo $PHPCMS['siteurl'];?>yp/collect.php?userid=<?php echo $rs['userid'];?>&title=<?php echo $rs['title'];?>&callback_js=callback_js&referer=<?php echo urlencode(URL);?>"></script>
<a href="<?php echo company_url($rs[userid],$rs[sitedomain]);?>" class="btn_01 white">查看企业首页</a><div class="clear"></div></div>
      </div>
      <div id="Product_Intro_Left" style="width:360px;" class="f_l">
        <div id="Product_BigImage" class="jqzoom"><img alt="<?php echo $rs['title'];?>" src="<?php echo thumb($rs['thumb'],349,260);?>" width="349" height="260"/></div>
        <div class="clear align_c mar_10"><img alt="点此查看大图" src="<?php echo $M['url'];?>images/zoom.gif" />&nbsp; <a onerror = "this.src='<?php echo $rs['thumb'];?>'"    target="_blank"  href="<?php echo $rs['thumb'];?>">点此查看大图</a></div>
      </div>
    </div>
    <div class="clear bg_10"></div>
    <div class="tit_1">
      <h3>产品介绍</h3>
    </div>
    <div class="clear"></div>
    <div class="pro_intro">　　
      <p><?php echo $rs['content'];?></p>
    </div>
    <div class="bk_10"></div>
    <div class="tit_1">
      <h3>联系方式</h3>
    </div>
    <div class="clear"></div>
    <div>
      <div class="f_r" style="width:400px;">
        <ul class="d_list">
          <li>　公司名称：<?php echo $c['companyname'];?></li>
  <li>　　联系人：<?php echo $c['linkman'];?></li> 
  <li>　联系电话：<?php echo magic_image($c['telephone']);?></li> 
  <li>　电子邮箱：<?php echo magic_image($c['email']);?></li> 
          <li>　公司类型：<?php echo $c['genre'];?></li>
          <li>　　地　址：<?php echo $c['address'];?></li>          
          <li>　公司网站：<a href="<?php echo company_url($c[userid],$c[sitedomain]);?>"><?php echo company_url($c[userid],$c[sitedomain]);?></a></li>
  <li>　<a href="<?php echo company_url($c[userid],$c[sitedomain]);?>">查看公司详情</a></li>
        </ul>
      </div>
      <div class="f_l"><img src="<?php echo $c['logo'];?>" alt="公司标志" width="240" onerror="this.src='images/nopic_small.gif'"/></div>
      <div class="clear"></div>
    </div>
  </div>
  <div id="left">
    <div class="box_t">
      <h3>产品库大类列表</h3>
    </div>
    <div class="box_c">
      <ul class="text_list w_100">
        <?php $DATA = get("SELECT catname,catid FROM `phpcms_category` WHERE module = 'yp' AND parentid = '0' ORDER BY listorder ASC", 0, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
        <li><a href="<?php echo list_url('product',$r['catid']);?>"><?php echo $r['catname'];?></a></li>
<?php } unset($DATA); ?>
      </ul>
      <div class="clear"></div>
    </div>
    <div class="box_b"></div>
    <div class="bk_10"></div>
    <div class="box_t">
      <h3>浏览过的产品</h3>
    </div>
    <div class="box_c">
      <ul class="pic_list_1">
      <?php if($prowhere) { ?>
  <?php $DATA = get("SELECT id,title,thumb FROM `phpcms_yp_product` WHERE id IN ($prowhere) AND status = '99' ORDER BY FIND_IN_SET(id,'$prowhere')", 10, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
  <li><a href="<?php echo show_url('product',$r[id]);?>"><img src="<?php echo thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif');?>" alt="" width="48" height="48"/></a><a href="<?php echo show_url('product',$r[id]);?>" title="<?php echo $r['title'];?>"><?php echo $r['title'];?></a></li>
  <?php } unset($DATA); ?>
  <?php } else { ?>
  <li>您还没有浏览过任何商品</li>
  <?php } ?>
      </ul>
      <div class="clear"></div>
    </div>
    <div class="box_b"></div>
    <div class="bk_10"></div>
    <div class="box_t">
      <h3>最新产品</h3>
    </div>
    <div class="box_c">
      <ul class="pic_list">
        <?php $DATA = get("SELECT p.id,p.title,p.thumb,c.companyname,p.userid FROM `phpcms_yp_product` `p`,`phpcms_member_company` `c` WHERE c.userid = p.userid AND p.status = '99' ORDER BY id DESC", 10, 0, "", "");foreach($DATA AS $n => $r) { $n++;?>
<li>
<img src="<?php echo thumb($r['thumb'],48,48,1,'images/no_pic_50_50.gif');?>" alt="" width="48" height="48"/>
<a href="<?php echo show_url('product',$r[id]);?>" title="<?php echo $r['title'];?>"><strong><?php echo str_cut($r['title'],20,'');?></strong></a>
<span><a href="<?php echo company_url($r['userid']);?>" title="<?php echo $r['companyname'];?>"><?php echo str_cut($r['companyname'],20,'');?></a></span>
</li>
<?php } unset($DATA); ?>
      </ul>
    </div>
    <div class="box_b"></div>
  </div>
</div>
<?php include template('yp', 'footer'); ?>
